package org.okkam.webservice;

public class EntityProfilePublicationServiceProxy implements org.okkam.webservice.EntityProfilePublicationService {
  private String _endpoint = null;
  private org.okkam.webservice.EntityProfilePublicationService entityProfilePublicationService = null;
  
  public EntityProfilePublicationServiceProxy() {
    _initEntityProfilePublicationServiceProxy();
  }
  
  public EntityProfilePublicationServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initEntityProfilePublicationServiceProxy();
  }
  
  private void _initEntityProfilePublicationServiceProxy() {
    try {
      entityProfilePublicationService = (new org.okkam.webservice.EntityProfilePublicationServiceServiceLocator()).getEntityProfilePublicationService();
      if (entityProfilePublicationService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)entityProfilePublicationService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)entityProfilePublicationService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (entityProfilePublicationService != null)
      ((javax.xml.rpc.Stub)entityProfilePublicationService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public org.okkam.webservice.EntityProfilePublicationService getEntityProfilePublicationService() {
    if (entityProfilePublicationService == null)
      _initEntityProfilePublicationServiceProxy();
    return entityProfilePublicationService;
  }
  
  public java.lang.String publish(java.lang.String ep) throws java.rmi.RemoteException{
    if (entityProfilePublicationService == null)
      _initEntityProfilePublicationServiceProxy();
    return entityProfilePublicationService.publish(ep);
  }
  
  
}